import { request } from 'umi';

// 查询
export async function page(data) {
  return request('/api/user/page', {
    method: 'post',
    data: data,
  });
}

// 新增
export async function add(data) {
  return request(`/api/user`, {
    method: 'post',
    data: data,
  });
}

// 修改
export async function update(data) {
  return request(`/api/user`, {
    method: 'put',
    data: data,
  });
}

// 删除
export async function del(data) {
  return request(`/api/user`, {
    method: 'DELETE',
    data: data,
  });
}

//获取角色列表
export async function getRoleList() {
  return request(`/api/select/rolelist`, {
    method: 'GET'
  });
}

//获取组织树
export async function getOrgTre(data) {
  return request(`/api/select/orgtre`, {
    method: 'GET',
  });
}


